Migrate to Tree-Based Game Structure (Maia2) Across Core Pages#9
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the frontend’s game structure to a new tree-based architecture (Maia2) across core pages, removing legacy components and consolidating controllers for a more consistent and modular codebase. Key changes include:
- Transitioning pages (Play, Turing, Training, Analysis, Puzzle) to use TreeController and tree-based game nodes.
- Removal of legacy analysis and game board components and updates to API endpoints to build and attach game trees.
- Refactoring several components (PromotionOverlay, GameplayInterface, BoardController) to work with the new tree structure.
Reviewed Changes
Copilot reviewed 20 out of 72 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Misc/AnalysisExportGame.tsx | Removed legacy export component. |
| src/components/Home/TeamMember.tsx | Replaced custom SVG with a standard globe icon. |
| src/components/Board/index.ts | Removed legacy exports and added new component exports. |
| src/components/Board/PromotionOverlay.tsx | Updated prop naming and switched to TreeControllerContext. |
| src/components/Board/GameplayInterface.tsx | Refactored move handling and promotion logic for tree support. |
| src/components/Board/GameClock.tsx | Updated import path for PlayControllerContext. |
| src/components/Board/GameBoard.tsx | Migrated move logic to work with availableMoves and currentNode. |
| src/components/Board/BoardController.tsx | Updated navigation callbacks and keyboard navigation. |
| src/api/turing/turing.ts | Integrated game tree construction in Turing game API. |
| src/api/train/train.ts | Integrated game tree building in Training game API. |
| src/api/analysis/analysis.ts | Removed legacy analysis API endpoints. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cxc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transitions the frontend to our new tree-based data structure for all game-related pages, replacing the old linear move array. This enables support for move variations and officially moves the platform fully onto using Maia2.
The Play, Turing, Training, Analysis, and Puzzle pages were all refactored to use the new structure. This involved cleaning up a lot of legacy code, simplifying and modularizing controllers and components, and fixing various type and build issues along the way.
TreeControllerand tree-based game nodesThis sets the foundation for more advanced analysis tools, better support for variations, and a cleaner, more consistent codebase going forward.